<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">
        <span class="font-bold" translate="aside.nav.process.diagnosis"></span>
    </h1>
</div>

<div ng-class="isSmart?'':'wrapper-md'" class="remove-wrapper">
    <div class="panel panel-default">
        <div ng-controller="DiagnosisCtrl" class="table-responsive">
            <table class="table table-striped m-b-none" cellpadding="0" cellspacing="0"
                   style=" width:100%" dt-disable-deep-watchers="true" ui-options="dtOptions" ui-jq="dataTable">
                <thead>
                <tr>
                    <th translate="business.servreq.id" ng-class="isSmart?'nowrap col-xs-4':''"></th>
                    <th translate="common.updated" ng-if="!isSmart"></th>
                    <th translate="common.name"></th>
                    <th translate="user.gender" ng-if="!isSmart"></th>
                    <th translate="business.servreq.serviceType" ng-if="!isSmart"></th>
                    <th translate="dashboard.specialist" ng-if="!isSmart"></th>
                    <th translate="business.servreq.status" ng-if="!isSmart"></th>
                    <th class="table-width-md" translate="common.operate"></th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="model in patients">
                    <td ng-class="isSmart?'nowrap col-xs-4':''">S-{{ model.servReq_Id }}</td>
                    <td ng-if="!isSmart">{{ moment(model._patCase._patient.updated).format("YYYY-MM-DD")}}</td>
                    <td>{{ model._patCase._patient._user.realName }}</td>
                    <td ng-if="!isSmart">
                        <span translate="{{ 'user.gender.' + model._patCase._patient._user.gender}}"></span>
                    </td>
                    <td ng-if="!isSmart">
                        <span translate="{{'servicetype.servicetype_' +  model._servType.service_Id}}"></span>
                    </td>
                    <td ng-if="!isSmart">
                        <span style="cursor: pointer;" ng-if="model._med_Expert" ng-click="open({templateUrl: 'openUserInfoo.html'}, {{model._med_Expert}})">
                            {{ model._med_Expert.realName }}
                        </span>
                    </td>
                    <td ng-if="!isSmart"><span translate="{{ 'status.' + model.status}}"></span></td>
                    <td class="table-width-md">
                        <button type="button" class="btn btn-sm btn-info font-bold"
                                translate="business.servreq.detail"
                                ng-click="open({ templateUrl: 'views/work/basic_servreq_flow.html' },model)">
                        </button>
                        <button type="button" class="btn btn-sm btn-primary font-bold"
                                ng-show="true == model.canSetNeedOpe || true == model.canSetNoOpeNeeded || true == model.canSetNeedDiag || true == model.canSetRetBySpecia"
                                ng-click="open({ templateUrl: 'diagProcess.html' },model)">
                                <span translate="aside.nav.process.manage"></span>
                        </button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div ng-include="'views/work/templates.html'"></div>
<script type="text/ng-template" id="openUserInfoo.html">
    <div ng-include="'views/system/user_detail.html?tmp=2'"></div>
</script>